{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import torch\n",
    "\n",
    "A = torch.FloatTensor([\n",
    "    [1.0, 0, 0, 0, 0],\n",
    "    [0.5, 0.5, 0, 0, 0],\n",
    "    [0.33, 0.33, 0.34, 0, 0],\n",
    "    [0.25, 0.25, 0.25, 0.25, 0],\n",
    "    [0.2, 0.2, 0.2, 0.2, 0.2]\n",
    "])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "outputs": [
    {
     "data": {
      "text/plain": "tensor([[ 1.4879,  1.7822, -0.9379, -0.2674, -0.4345],\n        [ 1.2550, -0.3209, -0.1185, -2.6069,  0.4900],\n        [ 0.1442,  1.2799, -1.0871, -0.7615, -0.8006],\n        [ 0.3853, -0.5502,  0.5960, -0.5883, -0.3828],\n        [-0.3018, -0.7254, -0.0946, -0.5013,  0.5336],\n        [ 0.3120, -0.5439, -1.0033,  1.3579, -0.9762],\n        [-0.6671,  0.8176, -2.1188,  0.7775, -0.2736],\n        [-0.4772,  1.6492, -0.8837, -0.7231, -0.5638],\n        [-0.4089,  1.2605, -0.1000, -0.6725, -1.4463],\n        [ 0.2025,  0.6393,  1.0969,  0.4102,  1.0432]])"
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "B = torch.randn([10, 5])\n",
    "B"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "outputs": [
    {
     "data": {
      "text/plain": "tensor([[ 1.9157,  0.4278, -0.4726, -0.1538, -0.0869],\n        [ 0.5017, -0.7533, -0.5940, -0.5537,  0.0980],\n        [ 0.0749, -0.0693, -0.7201, -0.3505, -0.1601],\n        [ 0.0832, -0.3021, -0.0210, -0.2236, -0.0766],\n        [-0.7143, -0.4125, -0.0507, -0.0186,  0.1067],\n        [-0.1468, -0.4588, -0.1969,  0.1442, -0.1952],\n        [-0.8178, -0.1507, -0.5807,  0.1397, -0.0547],\n        [-0.2377,  0.2394, -0.5940, -0.2936, -0.1128],\n        [-0.2690,  0.1398, -0.4914, -0.4574, -0.2893],\n        [ 1.1954,  0.9928,  0.6841,  0.3112,  0.2086]])"
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "torch.matmul(B, A)"
   ],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
